package com.hiyee.api.controller.customer;

import com.hiyee.annotation.CurrentCustomer;
import com.hiyee.annotation.JwtVerify;
import com.hiyee.api.config.MicroServiceNameConfig;
import com.hiyee.pojo.auth.LoginCustomer;
import com.hiyee.response.ResponseJsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 客户相关接口
 *
 * @author WangBin
 */
@FeignClient(value = MicroServiceNameConfig.MALL_SERVICE_CUSTOMER, path = "/rest/api/customer")
public interface CustomerControllerApi {
    /**
     * 获取客户基本信息
     *
     * @return Object
     */
    @GetMapping("/getInfo")
    @JwtVerify
    public ResponseJsonResult getInfo(@RequestParam(required = true, value = "id")Long customerId);

    /**
     * 获取客户账户信息
     *
     * @return Object
     */
    @GetMapping("/getAccount")
    @JwtVerify
    public ResponseJsonResult getAccount(@CurrentCustomer LoginCustomer loginCustomer);

    /**
     * 获取客户订单信息
     *
     * @return Object
     */
    @GetMapping("/getOrderStat")
    @JwtVerify
    public ResponseJsonResult getOrderStat(@CurrentCustomer LoginCustomer loginCustomer);
}
